package view;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GridLayout;

import javax.swing.JPanel;

import model.Square;

public class Map extends JPanel{

	private SquareRep[][] squares;
	
	public Map(SquareRep[][] squares){
		super(new GridLayout(squares[0].length, squares.length));
		Dimension d = new Dimension(squares.length*SquareRep.WIDTH, squares[0].length*SquareRep.HEIGHT);
		setSize(d);
		setPreferredSize(d);
		this.squares = squares;
		for(int j = 0;j<squares[0].length;j++){
			for(int i = 0;i<squares.length;i++){
				add(squares[i][j]);
			}
		}
	}
	
}
